package org.example;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.ListView;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;

public class ImportedObjectList {

    private ObservableList<String> importedObjectsList;
    private ListView<String> listView;

    public ImportedObjectList() {
        importedObjectsList = FXCollections.observableArrayList();
        listView = new ListView<>(importedObjectsList);
    }

    public void addImportedObject(String objectName) {
        importedObjectsList.add(objectName);
    }

    public ListView<String> getListView() {
        return listView;
    }

    private class DisplayableObject {
        private String name;
        private Image image;
        private boolean isChecked;

        public DisplayableObject(String name, Image image) {
            this.name = name;
            this.image = image;
            this.isChecked = true;
        }

        public String getName() {
            return name;
        }

        public Image getImage() {
            return image;
        }

        public boolean isChecked() {
            return isChecked;
        }

        public void setChecked(boolean checked) {
            isChecked = checked;
        }
    }

}